package mediadisplay.viewerarea 
{
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.text.TextField;
	/**
	 * ...
	 * @author Anders Figenschow selvfølgelig
	 */
	public class Coordinates extends Sprite
	{
		private var tf:TextField;
		
		public function Coordinates() 
		{
			if (stage) init();
			else addEventListener(Event.ADDED_TO_STAGE, init);
		}
		
		private function init(e:Event = null):void 
		{
			removeEventListener(Event.ADDED_TO_STAGE, init);
			tf = new TextField();
			addChild(tf);
			tf.width = 100;
			tf.height = 30;
			tf.border = true;
			tf.borderColor = 0xff0000;
			tf.textColor = 0xffffff;
			tf.text = "xxx / xxx";
		}
		
		public function change(x:int, y:int):void {
			tf.text = String(x) + " / " + String(y);
		}
		
	}

}